package com.jinlia.show.modules.system.controller.api;

import com.jinlia.show.modules.system.client.HelloClient;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("/hello/client")
public class HelloClientController {

    @Autowired
    HelloClient helloClient;
    @GetMapping()
    public ResponseEntity<Boolean> getById() {
        Boolean aBoolean = helloClient.sentTo("4321");
        return ResponseEntity.ok(aBoolean);
    }
}
